<html>
<head>
<title>WIKINDX DOCUMENTATION</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/wikindx2/docs/docs.css" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h2>UTF-8 Character Encoding</h2>
<p>"UTF-8 (8-bit Unicode Transformation Format) is a lossless, variable-length character encoding for Unicode created by Ken Thompson and Rob Pike. It uses groups of bytes to represent the Unicode standard for the alphabets of many of the world's languages." (<a href="http://en.wikipedia.org/wiki/UTF-8" target="_blank">Wikipedia</a>). Further information may be found at <a href = "http://www.utf-8.com/" target="_blank">UTF-8.com</a>.</p>

<p>WIKINDX uses UTF-8 encoding throughout and all template header.tpl files must contain the line:<br />
<code>
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
</code></p>

<p>If web browser output has not been UTF-8 encoded, non-English characters may display as '?' or their literal UTF-8 representation. As long as the charset in header.tpl is set to UTF-8, all form input from the user is automatically stored in the database as UTF-8 and, once requested from the database, will be displayed in its original and correct character formatting in the web browser. The one exception to this is where a web server such as Apache sets a non-UTF-8 character set that will override the  browser form input character set. Fortunately, WIKINDX is smart enough to recognise non-UTF-8 characters and will encode accordingly when inserting data in the database. </p>

<p>However, because the charset is UTF-8, all text destined for browser display that does not originate in the database via form input or text uploading (importing bibTeX or Endnote bibliographies) <strong>must</strong> be encoded in UTF-8 prior to browser display.  This includes all text in the files within the languages/ folder; if you are a translator working on files within languages/, you will need to encode each file to UTF-8 prior to use. </p>
<p>Developers attempting to decode UTF-8 from the database for certain operations beware!  Some preg_xxx() operations interfere with the UTF-8 encoding of data in the database producing incorrect browser display -- you may need to decode the UTF-8 first then finally utf8_encode(). <strong>Do not use PHP's utf8_decode()!</strong> Use the method <a href = "../classes/messages/decodeUtf8Method.html">UTF8::decodeUtf8(STRING: $string)</a>.</p>
<p align="right"><a href="../index.html">WIKINDX 
home</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../classes/index.html">WIKINDX 
classes</a></p>
</body>
</html>
